<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../lib/vue.js"></script>
</head>
<body>
    <div id="app">
        <input v-model="keyword" type="text">
        <p v-for="(item,index) in resultArr" :key="index">{{item}}</p>
    </div>
</body>
<script>
    new Vue({
        el:"#app",
        data:{
            keyword:"",
            arr:["zhangsan","lisi","wangwu","zhaoliu","yanqi","shenba","qianjiu","shenshi"]
        },
        computed:{
            resultArr(){
                if(this.keyword)//zha;lskdjf;laskdjf
                    return this.arr.filter(v=>v.includes(this.keyword));
            }
        }

    })
</script>
</html>